<?phpuse Illuminate\Database\Eloquent\Model;class configModel extends Model{    protected $table = 'sys_config';    public $primaryKey = 'id';    protected function getItemsAttribute()    {        return $this->attributes['items'] ? explode(',', $this->attributes['items']) : [];    }    protected function getValueAttribute()    {        if (isset($this->attributes['input_mode']) && $this->attributes['input_mode'] == 'checkbox') {            return $this->attributes['value'] ? json_decode($this->attributes['value'], true) : [];        }elseif (isset($this->attributes['input_mode']) && $this->attributes['input_mode'] == 'images') {            return $this->attributes['value'] ? json_decode($this->attributes['value'], true) : [];        }        return $this->attributes['value'];    }    protected function serializeDate($date)    {        return $date->format('Y-m-d H:i:s');    }}